# import matplotlib.pyplot as plt
# from keras.utils import to_categorical
# from sklearn import metrics
# from sklearn.metrics import roc_curve, auc
#
#
# # ROC曲线
# def auc_curve(y, prob):
#     fpr, tpr, threshold = roc_curve(y, prob)
#     roc_auc = auc(fpr, tpr)
#
#     lw = 2
#     plt.figure(figsize=(10, 10))
#     plt.plot(fpr, tpr, color='darkorange', lw=lw, label='ROC curve (area=%0.3f)' %  roc_auc)
#     plt.plot([0, 1], [0, 1], color='navy', lw=lw, linestyle='--')
#     plt.xlim([0.0, 1.0])
#     plt.ylim([0.0, 1.05])
#     plt.xlabel('False Positive Rate')
#     plt.ylabel('True Positive Rate')
#     plt.title('AUC')
#     plt.legend(loc='lower right')
#
#     plt.show()

from sklearn.preprocessing import MinMaxScaler, StandardScaler
import numpy as np


def standard_scaler(features):
    scaler = MinMaxScaler()
    # scaler = StandardScaler()
    x_train = scaler.fit_transform(features)
    return x_train


if __name__ == '__main__':
    a = np.array([[1, 2, 3, 4],
                  [4, 5, 6, 7],
                  [7, 8, 9, 10]], dtype=np.int)
    print(a)

    b = standard_scaler(a)
    print(b)